<template>
    <div class="main">
        <div>proa项目的页面</div>
        <div>href==>{{ href }}</div>
        <router-link to="/home">/home</router-link>
        <div>---</div>
        <router-link to="/about">/about</router-link>
        <!-- <router-view #="{ Component }">
            <component :is="Component" :key="route.fullPath" />
        </router-view> -->
        <router-view #="{ Component }">
            <template v-if="Component">
                <keep-alive>
                    <component :is="Component" :key="route.fullPath" />
                </keep-alive>
            </template>
        </router-view>
    </div>
</template>
<script setup lang="ts">
import { ref, watch } from 'vue'
import { useRoute } from 'vue-router'
const route = useRoute()
const href = ref('')
watch(
    () => route.fullPath,
    () => {
        href.value = window.location || window.$wujie.location.href
    },
    { deep: true, immediate: true }
)
</script>
<style lang="css">
.main {
    border: 1px solid #00f;
    height: 100vh;
}
</style>
